package com.gblfy.user.service.impl;

import com.gblfy.api.dubbo.IDubboService;
import com.gblfy.api.dubbo.IDubboService2;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;

@DubboService
public class DubboServiceImpl implements IDubboService {

    @DubboReference
    private IDubboService2 dubboService2;

    @Override
    public String getDubboHello(String name) {
        return "恭喜" + name + "调用Dubbo服务成功！";
    }

    /**
     * 测试dubbo调用dubbo服务
     *
     * @param name
     * @return
     */
    @Override
    public String getDubboRedirect(String name) {
        return dubboService2.getDubboHello2(name);
    }
}
